package cn.xspace.module.other.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.RelativeLayout;

import com.xspace.android.xafcommon.base.BaseActivity;

import cn.xspace.app.view.TitleBar;
import cn.xspace.module.other.R;
import cn.xspace.module.other.adapter.SearchAdapter;

public class AllQuestionAct extends BaseActivity implements View.OnClickListener {


    private TitleBar mSettingTitleBar;
    private ImageView mSearchIv;
    private EditText mSearchEt;
    private RelativeLayout mFeedbackSearch;
    private ListView mSearchListview;
    private LinearLayout mActivityUserFeedback;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }

    @Override
    protected void initView() {
        setContentView(R.layout.activity_all_question);
    }

    @Override
    protected void initData() {

    }

    @Override
    protected void initFindViewById() {
        mSettingTitleBar = (TitleBar) findViewById(R.id.setting_title_bar);
        mSearchIv = (ImageView) findViewById(R.id.search_iv);
        mSearchEt = (EditText) findViewById(R.id.search_et);
        mFeedbackSearch = (RelativeLayout) findViewById(R.id.feedback_search);
        mSearchListview = (ListView) findViewById(R.id.search_listview);
        mActivityUserFeedback = (LinearLayout) findViewById(R.id.activity_user_feedback);
    }

    @Override
    protected void initEvent() {
        mSettingTitleBar.setLeftLayoutClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
        mSettingTitleBar.setRightLayoutClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
        mFeedbackSearch.setOnClickListener(this);
        mSearchListview.setAdapter(new SearchAdapter(this));
    }

    @Override
    public void onClick(View v) {
        if (v.getId() == R.id.feedback_search){
            startActivity(new Intent(this,SearchAct.class));
        }
    }
}
